#ifndef FILEAPPENDER_H
#define FILEAPPENDER_H

#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <syslog.h>
#include <stdarg.h>

#include "Types.h"
#include "Entry.h"
#include "Appender.h"

#define LOG_BUFFER	256

namespace logging {

class FileAppender : public Appender
{
	friend class AppenderFactory;

public:
	~FileAppender();

	void write(Entry *entry);

protected:
	FileAppender(const char *name);

private:
	static const int BUFFER_SIZE;
	int _fd;
};

}

#endif /* FILEAPPENDER_H */

